import request from '@/utils/request'
// 查询子任务
export function getSubTask(id) {
	return request({
		url: `/subtask/getSubTask/${id}`,
		method: 'post',
		//data,
	})
}
//删除自子任务
export function deleteSubTask(id) {
	return request({
		url: `/subtask/deleteSubTask/${id}`,
		method: 'post',
		//data,
	})
}
//获取所有参数列表
export function selectAppParamTree(current, size, data) {
	return request({
		url: `/subtask/selectFastCAEParamTree/${current}/${size}`,
		method: 'post',
		data,
	})
}

//获取仿真任务数量统计
export function getNumber() {
	return request({
		url: `/subtask/getFastCAENumber`,
		method: 'post',
		// data,
	})
}
//获取结果图片
export function getResultPic(id) {
	//id = '13e8dde901f194e3276e024151752a9b'
	return request({
		url: `/taskComputeResult/getResultPic/${id}`,
		method: 'post',
		// data,
	})
}
//下载结果odb文件
export function downloadOdb(id) {
	return request({
		url: `/taskComputeResult/downloadOdb/${id}`,
		method: 'post',
		// data,
	})
}

/**
 * 获取子任务错误结果信息
 * @param {string} subTaskId 子任务ID
 */
export function getResultErrorMsg(subTaskId) {
	return request({
		url: `/taskComputeResult/getErrorTaskResult/${subTaskId}`,
		method: 'post',
	})
}

/**
 * 下载结果文件
 * @param {string} 
 */
export function downFile(data) {
	//console.log('发给后端参数',data)
	return request({
		url: `/file/downFile`,
		method: 'post',
		data
	})
}

